<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-pageedit',plain:true"
   onclick="crud_update_${object.code}()">
    修改
</a>
<script type="text/javascript">
    var crud_update_${object.code} = function () {
        var grid = $('#${gridId}');
        var parentType = '${parentType!}';
        var row = grid.datagrid('getSelected');
        var num = grid.datagrid('getSelections').length;
        if (num > "1") {
        	$.slideMsg("请勿选择多行数据！");
            return;
        }
        if (isSelected(row)) {
        	var ref = '';
        	// ------------------------------级联
	        var parent = $('#${parentId!}');
	        var objectField = '${objectField!}';
	        var field = '${field!}';
        	if(parent && objectField != '' && field != ''){
        		// 从父组件上获取选中外键值
        		var parentRow = parent.datagrid('getSelected');
        		ref = ref + "?ref=" + field + ":" + parentRow[objectField];
        	}
        	// ------------------------------级联
        	
            loadDialog(grid, '修改${object.name}', '/form/update/${object.code}-' + row.pk_val + ref);
            $('.dialog-button').css("text-align","center");
        }
    };
</script>